package listener;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import hauptklassen.Main;

public class MyKeyListener implements KeyListener{

	@Override
	/**
	 * Wenn die Taste gedrückt ist
	 */
	public void keyPressed(KeyEvent e) {
//		if (Main.m.ingame){
//			if (e.getKeyCode()==37){
//				Main.direction = ("left");
//			}else if(e.getKeyCode()==39){
//				Main.direction = ("right");
//			}else if(e.getKeyCode()==34){
//				Main.m.pauseGame();
//			}
//		}
		if(e.getKeyCode()==80&&Main.m.pause){
			Main.m.continueGame();
		}else if(e.getKeyCode()==80&&!Main.m.pause){
			Main.m.pauseGame();
		}
		
//		System.out.println(e.getExtendedKeyCode());
		
	}
	/**
	 * Wenn die Taste losgelassen wird
	 */
	public void keyReleased(KeyEvent e) {
		
//		if (e.getKeyCode() == 37 || e.getKeyCode() == 39) {Main.direction = "null";}
		
	}
	public void keyTyped(KeyEvent e) {}

}
